{extend name="public/base" /}
{block name="body"}
<div class="layui-fluid">
  	<div class="layui-row">
    	<div class="layui-col-md12 layui-col-xs12">
			<div class="widget-head">
				<div class="widget-title">领取记录</div>
			</div>
		</div>
		<div class="layui-col-md12 layui-col-xs12 widget-body">
			<!-- 工具栏 -->
			<div class="page_toolbar">
				<div class="layui-btn-group">
					<a href="{:url('Coupon/delLog')}" class="layui-btn ajax-batch"><i class="fa fa-trash-o"></i> 删除</a>
				</div>
			</div>
			<div class="layui-col-md12" >
				<table width="100%" class="layui-table layui-form">
					<thead>
						<tr>
							<th width="30"><input type="checkbox" lay-skin="primary" lay-filter="*"></th>
							<th>ID</th>
							<th>会员</th>
							<th>名称</th>
							<th>类型</th>
							<th>最低消费</th>
							<th>有效期</th>
							<th>领取时间</th>
						</tr>
					</thead>
					<tbody>
						{volist name="list" id="vo"}
						<tr>
							<td><input type="checkbox" name="id" value="{$vo.id}" lay-skin="primary"></td>
							<td>{$vo.id}</td>
							<td>{$vo.member.nickname}</td>
							<td>{$vo.coupon.name}</td>
							<td>
								{switch vo.coupon.type}
    								{case 1}满减券{/case}
    								{case 2}折扣券{/case}
								{/switch}
							</td>
							<td>{$vo.coupon.price}</td>
							<td>{$vo.coupon.end_time}</td>
							<td>{$vo.create_time}</td>
						</tr>
						{/volist}
					</tbody>
				</table>
				<div class="layui-col-md12 layui-col-xs12">
					<div class="page">{$list->render()|raw}</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}